import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/tools',
    name: 'Tools',
    component: () => import('../views/Tools.vue')
  },
  {
    path: '/tools/:category',
    name: 'ToolCategory',
    component: () => import('../views/ToolCategory.vue')
  },
  {
    path: '/tool/base64',
    name: 'Base64Tool',
    component: () => import('../views/tools/text/Base64Tool.vue')
  },
  {
    path: '/tool/text-case',
    name: 'TextCaseTool',
    component: () => import('../views/tools/text/TextCaseTool.vue')
  },
  {
    path: '/tool/json-formatter',
    name: 'JsonFormatterTool',
    component: () => import('../views/tools/text/JsonFormatterTool.vue')
  },
  {
    path: '/tool/qr-generator',
    name: 'QrGeneratorTool',
    component: () => import('../views/tools/image/QrGeneratorTool.vue')
  },
  {
    path: '/tool/color-picker',
    name: 'ColorPickerTool',
    component: () => import('../views/tools/developer/ColorPickerTool.vue')
  },
  {
    path: '/tool/password-generator',
    name: 'PasswordGeneratorTool',
    component: () => import('../views/tools/developer/PasswordGeneratorTool.vue')
  },
  {
    path: '/tool/md5',
    name: 'Md5Tool',
    component: () => import('../views/tools/text/Md5Tool.vue')
  },
  {
    path: '/tool/sha1',
    name: 'Sha1Tool',
    component: () => import('../views/tools/text/Sha1Tool.vue')
  },
  {
    path: '/tool/aes',
    name: 'AesTool',
    component: () => import('../views/tools/text/AesTool.vue')
  },
  {
    path: '/tool/url',
    name: 'UrlTool',
    component: () => import('../views/tools/text/UrlTool.vue')
  },
  {
    path: '/tool/morse',
    name: 'MorseTool',
    component: () => import('../views/tools/text/MorseTool.vue')
  },
  {
    path: '/tool/guid',
    name: 'GuidGeneratorTool',
    component: () => import('../views/tools/developer/GuidGeneratorTool.vue')
  },
  {
    path: '/tool/ascii',
    name: 'AsciiTool',
    component: () => import('../views/tools/text/AsciiTool.vue')
  },
  {
    path: '/tool/fullwidth',
    name: 'FullwidthTool',
    component: () => import('../views/tools/text/FullwidthTool.vue')
  },
  {
    path: '/tool/image-compress',
    name: 'ImageCompressTool',
    component: () => import('../views/tools/image/ImageCompressTool.vue')
  },
  {
    path: '/tool/image-convert',
    name: 'ImageConvertTool',
    component: () => import('../views/tools/image/ImageConvertTool.vue')
  },
  {
    path: '/tool/image-resize',
    name: 'ImageResizeTool',
    component: () => import('../views/tools/image/ImageResizeTool.vue')
  },
  {
    path: '/tool/image-watermark',
    name: 'ImageWatermarkTool',
    component: () => import('../views/tools/image/ImageWatermarkTool.vue')
  },
  {
    path: '/encode-decode',
    name: 'EncodeDecodeTools',
    component: () => import('../views/EncodeDecodeTools.vue')
  },
  {
    path: '/tool/scientific-calculator',
    name: 'ScientificCalculatorTool',
    component: () => import('../views/tools/calculator/ScientificCalculatorTool.vue')
  },
  {
    path: '/tool/unit-converter',
    name: 'UnitConverterTool',
    component: () => import('../views/tools/calculator/UnitConverterTool.vue')
  },
  {
    path: '/tool/byte-unit-converter',
    name: 'ByteUnitConverterTool',
    component: () => import('../views/tools/converter/ByteUnitConverterTool.vue')
  },
  {
    path: '/tool/date-time-calculator',
    name: 'DateTimeCalculatorTool',
    component: () => import('../views/tools/time/DateTimeCalculatorTool.vue')
  },
  {
    path: '/tool/workday-calculator',
    name: 'WorkdayCalculatorTool',
    component: () => import('../views/tools/time/WorkdayCalculatorTool.vue')
  },
  {
    path: '/tool/lunar-converter',
    name: 'LunarConverterTool',
    component: () => import('../views/tools/time/LunarConverterTool.vue')
  },
  {
    path: '/tool/world-time-converter',
    name: 'WorldTimeConverterTool',
    component: () => import('../views/tools/time/WorldTimeConverterTool.vue')
  },
  {
    path: '/tool/date-format-converter',
    name: 'DateFormatConverterTool',
    component: () => import('../views/tools/time/DateFormatConverterTool.vue')
  },
  {
    path: '/tool/timestamp-batch-converter',
    name: 'TimestampBatchConverterTool',
    component: () => import('../views/tools/time/TimestampBatchConverterTool.vue')
  },
  {
    path: '/tool/date-calculator',
    name: 'DateCalculatorTool',
    component: () => import('../views/tools/calculator/DateCalculatorTool.vue')
  },
  {
    path: '/tool/percentage-calculator',
    name: 'PercentageCalculatorTool',
    component: () => import('../views/tools/calculator/PercentageCalculatorTool.vue')
  },
  {
    path: '/tool/loan-calculator',
    name: 'LoanCalculatorTool',
    component: () => import('../views/tools/calculator/LoanCalculatorTool.vue')
  },
  {
    path: '/tool/exchange-rate-converter',
    name: 'ExchangeRateConverterTool',
    component: () => import('../views/tools/calculator/ExchangeRateConverterTool.vue')
  },
  {
    path: '/tool/ip-query',
    name: 'IpQueryTool',
    component: () => import('../views/tools/network/IpQueryTool.vue')
  },
  {
    path: '/tool/website-speed-test',
    name: 'WebsiteSpeedTestTool',
    component: () => import('../views/tools/network/WebsiteSpeedTestTool.vue')
  },
  {
    path: '/tool/port-scanner',
    name: 'PortScannerTool',
    component: () => import('../views/tools/network/PortScannerTool.vue')
  },
  {
    path: '/tool/whois-query',
    name: 'WhoisQueryTool',
    component: () => import('../views/tools/network/WhoisQueryTool.vue')
  },
  {
    path: '/tool/code-formatter',
    name: 'CodeFormatterTool',
    component: () => import('../views/tools/developer/CodeFormatterTool.vue')
  },
  {
    path: '/tool/timestamp-converter',
    name: 'TimestampConverterTool',
    component: () => import('../views/tools/developer/TimestampConverterTool.vue')
  },
  {
    path: '/tool/api-testing',
    name: 'ApiTestingTool',
    component: () => import('../views/tools/developer/ApiTestingTool.vue')
  },
  {
    path: '/tool/sql-formatter',
    name: 'SqlFormatterTool',
    component: () => import('../views/tools/developer/SqlFormatterTool.vue')
  },
  {
    path: '/tool/text-diff',
    name: 'TextDiffTool',
    component: () => import('../views/tools/text/TextDiffTool.vue')
  },
  {
    path: '/tool/regex-tester',
    name: 'RegexTesterTool',
    component: () => import('../views/tools/text/RegexTesterTool.vue')
  },
  {
    path: '/tool/xml-formatter',
    name: 'XmlFormatterTool',
    component: () => import('../views/tools/text/XmlFormatterTool.vue')
  },
  {
    path: '/tool/csv-to-json',
    name: 'CsvToJsonTool',
    component: () => import('../views/tools/text/CsvToJsonTool.vue')
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('../views/NotFound.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
